using System;
using System.Runtime.InteropServices;

namespace Atomic.Libraries.Mathematics
{
	public static partial class Gsl
	{
		/// <summary>
		/// Complete integral $F_{-1}(x)=e^x/(e^x+1)$.
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_m1(double x);

		/// <summary>
		/// Complete integral $F_0(x)=\int_0^\infty 1/(e^{t-x}+1)dt=\log(e^x+1)$.
		/// http://en.wikipedia.org/wiki/Complete_Fermi%E2%80%93Dirac_integral
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_0(double x);

		/// <summary>
		/// Complete integral $F_1(x)=\int_0^\infty t/(e^{t-x}+1)dt$.
		/// http://en.wikipedia.org/wiki/Complete_Fermi%E2%80%93Dirac_integral
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_1(double x);

		/// <summary>
		/// Complete integral $F_2(x)=\int_0^\infty t^2/(e^{t-x}+1)dt/2$.
		/// http://en.wikipedia.org/wiki/Complete_Fermi%E2%80%93Dirac_integral
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_2(double x);

		/// <summary>
		/// Complete integral $F_j(x)=\int_0^\infty t^2/(e^{t-x}+1)dt/\Gamma(j+1)$.
		/// http://en.wikipedia.org/wiki/Complete_Fermi%E2%80%93Dirac_integral
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_int(int j, double x);

		/// <summary>
		/// Complete integral $F_{-1/2}(x)$.
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_mhalf(double x);

		/// <summary>
		/// Complete integral $F_{1/2}(x)$.
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_half(double x);

		/// <summary>
		/// Complete integral $F_{3/2}(x)$.
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_3half(double x);

		/// <summary>
		/// Incomplete integral $F_0(x,b)=\int_b^\infty 1/(e^{t-x}+1)dt$.
		/// http://en.wikipedia.org/wiki/Incomplete_Fermi%E2%80%93Dirac_integral
		/// </summary>
		[DllImport("gsl")]
		public static extern double gsl_sf_fermi_dirac_inc_0(double x, double b);
	}
}
